Conditions | 2 |
Total Lines | 14 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { |
||
26 | |||
27 | @Put(':id') |
||
28 | @ApiOperation({title: 'Update daily rate'}) |
||
29 | public async index(@Param() idDto: IdDTO, @Body() dto: DailyRateDTO) { |
||
30 | try { |
||
31 | const {userId, customerId, taskId, amount} = dto; |
||
32 | |||
33 | const id = await this.commandBus.execute( |
||
34 | new UpdateDailyRateCommand(idDto.id, amount, userId, customerId, taskId) |
||
35 | ); |
||
36 | |||
37 | return {id}; |
||
38 | } catch (e) { |
||
39 | throw new BadRequestException(e.message); |
||
40 | } |
||
43 |